package com.sharemarking.wa.common.eum;

/**
 * @author dxy
 */
public enum OrderTypeEum {

    PARENT_TYPE(0, "总单"),
    CHILDREN_TYPE(1, "子单");
    private Integer key;
    private String value;

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    OrderTypeEum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getValue(String index) {
        for (OrderTypeEum item : OrderTypeEum.values()) {
            if (item.getKey().equals(index)) {
                return item.value;
            }
        }
        return null;
    }
}
